'''
Created on 2012-7-20

@author: game-netease
'''
import Config

def loadTuple(str, factor=None):
    if str == None:
        return None
    else:
        fs = [float(s) for s in str.split(',')]
        if factor != None:
            for i in range(len(fs)):
                fs[i] = int(fs[i] * Config.window_size[i % len(factor)] / factor[i % len(factor)])
        return tuple(fs)
